public class Test {
    public static void fun1(Animal animal) {
        animal.eat();
    }
    /**
     * 接口实现多态，接口会让程序员忘记类型
     * @param args
     */
    public static void testFly(IFly iFly) {
        iFly.fly();
    }
public static void testRun(IRun iRun) {
        iRun.run();
}
public static void testAmphibious(IAmphibious iAmphibious) {
        iAmphibious.amphibious();
}
    public static void main(String[] args) {
        testFly(new Bird("布谷"));
        testFly(new Duck("杰克"));
        testRun(new Roboot());//接口的好处
        testRun(new Frog("青蛙"));
        testAmphibious(new Frog("青蛙"));
    }
    public static void main1(String[] args) {
        fun1(new Dog("旺财"));
        fun1(new Bird("布谷"));
    }
}
